import React from 'react';
import {Button, ScrollView, View} from "@tarojs/components";
import Taro from '@tarojs/taro';

import './index.scss';

function HookTextPage() {

  function onRouteToClockPage() {
    Taro.navigateTo({
      url:'/pages/hookTest/ClickTest/ClickTest',
    });
  }
  function onRouteToHookApi() {
    console.log("route to Hook Api");
    Taro.navigateTo({
      url: '/pages/hookTest/HookAPI/HookApi?initialCount=12'
    });
  }
  function onRouteToPropsPage() {
    Taro.navigateTo({
      url:'/pages/hookTest/PropsPage/PropsPage?prop01=12&prop02=qwqw',
    });
  }
  function onRouteToListPage() {
    Taro.navigateTo({
      url:'/pages/hookTest/ListPage/index'
    });
  }
  return (
    <View>
      <ScrollView>
        <Button className='button' onclick={()=>onRouteToClockPage()}>Click Test</Button>
        <Button hover-class='hover' className='button' onclick={()=>onRouteToHookApi()}>route to Hook Api</Button>
        <Button className='button' onclick={()=>onRouteToPropsPage()}>route to Hook Api</Button>
        <Button
          id={'button'}
          className={'button-route-to-list-page'}
          type={'primary'}
          onclick={()=>onRouteToListPage()}
        >
          on Route To List Page
        </Button>
        <button hover-class='hover'> 点击了 button </button>
      </ScrollView>
    </View>
  );
}

export default HookTextPage;
